<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div>
    <el-form ref="form" :model="pro_category" :rules="rules" label-width="100px" id="mvcfm">
      <div class="form-unit">
        <span class="mvc-title-left"> 产品类别 </span>
      </div>
      <div>
        <el-row>
          <el-col :span="24">
            <el-form-item label="名称" prop="pro_name">
              <el-input v-model="pro_category.pro_name" />
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <el-button @click="addProductClissRangeSubmit('')" type='success' size="mini"><i class='fa fa-check'></i>保存</el-button>
    </el-form>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'AddProductClissRange',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        pro_category: {
          pro_name: null,
        },
        loading: false,
        rules: {
          pro_name: [{
            required: true,
            message: "名称不能为空",
            trigger: 'blur',
          }],
        }
      }
    },
    created() {},
    updated() {},
    mounted() {},
    methods: {
      addProductClissRangeSubmit(_params) {
        this.$refs["form"].validate(valid => {
          if (valid) {
            request({
              method: 'post',
              url: '/xcapi/VUEAction/mes/product/TechnologyAction/addProductClissRangeSubmit?' + _params + this.vueparams,
              data: this.postData()
            }).then(data => {
              this.$router.replace("/redirect" + this.$route.fullPath);
              this.msgSuccess(data.msg);
            })
          } else {
            this.msgError("必填项错误");
          }
        });
      },
    },
  }
</script>
